package czt.ocr.controller;

import czt.ocr.service.EFileService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.io.IOException;

/**
 * @author czt
 * @version 1.0
 * @since 2025/4/6
 */
@RestController
@RequestMapping("/eFile")
public class EFileController {

    @Autowired
    private EFileService eFileService;

    /**
     * 导入
     * @return 成功提示
     */
    @GetMapping("/save")
    public String save() throws IOException {
        // eFileService.save();
        eFileService.save2();
        return "ok";
    }

    /**
     * 导出
     * @return 成功提示
     */
    @GetMapping("load")
    public String load() {
        // eFileService.load();
        eFileService.load2();
        return "ok";
    }
}
